package com.haojiang.mh.ui.activity

import android.view.View
import com.haojiang.mh.R
import com.haojiang.mh.cache.Const
import com.haojiang.mh.ui.base.BaseActivity
import kotlinx.android.synthetic.main.activity_report_explain.*

/**
 * 报告介绍说明页
 *
 * Created by ZapFive on 2019-06-03.
 *
 * wuzhuang@mirahome.me
 */
class ReportExplainActivity : BaseActivity() {

    private lateinit var childRsId: String

    override fun getLayoutId() = R.layout.activity_report_explain

    override fun getTitleName() = ""

    override fun initActivity() {
        childRsId = "layout_explain_" + intent.getStringExtra(Const.EXTRA_DATA)
    }

    override fun initView() {

        aiv_activity_right.setOnClickListener { onBackClick() }

        val layoutId = resources.getIdentifier(childRsId, "layout", packageName)
        val child = View.inflate(context, layoutId, null)
        layout_explain.addView(child)
    }

    override fun onBackClick() {
        super.onBackClick()
        overridePendingTransition(R.anim.anim_blank, R.anim.push_bottom_out)
    }
}